using System;

namespace Ioc.Kernel.Exceptions
{
    public class DuplicatedComponentException : ApplicationException
    {
        public DuplicatedComponentException()
            : base("You are trying to register a component that is already registered") {}

        public DuplicatedComponentException(string componentClass, string componentID)
            : base(string.Format("A component for the class {0} with id {1} is already registered", componentClass,componentID)) {}

        public DuplicatedComponentException(string componentClass, string componentID, Exception innerException)
            : base(string.Format("A component for the class {0} with id {1} is already registered", componentClass,componentID), innerException) {}
    }
}